Sliding members, such as sliding glass doors and windows are usually equipped with a standard releasable lock which retains the door or window in a locked position. Such doors and windows are, however, notoriously easy to open from the outside, even though the standard lock is properly locked on the inside. Accordingly, there is a need for a lock for sliding doors and windows which will positively exclude unauthorized entries. Many attempts have been made to provide such a lock, but such attempts have been relatively unsuccessful. Locks presently available cause the loss of use of part of the opening of the door because of the mechanism. The locks available require the mechanism to be attached near the center of the door wherein the present invention, because of the hinging design, allows the device to be mounted at any height on the door. The devices available require a gravity feed situation in order for the lock to actuate such as in U.S. Pat. No. 3,563,592. Other devices, which are presently available, restrict the opening of the sliding member such as in U.S. Pat. No. 3,698,754, whereas the present invention, because of its unique folding characteristics, causes the loss of only a very minimal amount of the door opening when the device is in the collapsed position.